﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using INNOVACALL.Framework.Common.MVCHelpers;

namespace InnovaApp.Portals.MVC4Portal.Controllers
{
    public class LayoutManagerController : Controller
    {
        private string eMethodBase = "InnovaApp.Portals.InnovaAppFrontOfficePortal.Controllers.LayoutManagerController";
        [HttpPost, Authorize, CacheManager(enCacheMode.NoCache)]
        public JsonResult GetLayout(string LayoutId, string Content)
        {
            string eMethod = eMethodBase + "Save[POST]";
            object eParameters = new { LayoutId = LayoutId };
            JsonResult toReturn = new JsonResult { JsonRequestBehavior = JsonRequestBehavior.AllowGet };
            toReturn.Data = new { success = true, htmlContent = string.Format("<div class='{0}'><div xlass='mceEditable'>{1}</div></div>", LayoutId, Content) };
            return toReturn;
        }

    }
}
